package com.ruoyi.environment.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.environment.mapper.EnvProReportMapper;
import com.ruoyi.environment.domain.EnvProReport;
import com.ruoyi.environment.service.IEnvProReportService;

/**
 * 环评和批复Service业务层处理
 * 
 * @author yxf
 * @date 2021-08-10
 */
@Service
public class EnvProReportServiceImpl implements IEnvProReportService 
{
    @Autowired
    private EnvProReportMapper envProReportMapper;

    /**
     * 查询环评和批复
     * 
     * @param eprId 环评和批复ID
     * @return 环评和批复
     */
    @Override
    public EnvProReport selectEnvProReportById(Long eprId)
    {
        return envProReportMapper.selectEnvProReportById(eprId);
    }

    /**
     * 查询环评和批复列表
     * 
     * @param envProReport 环评和批复
     * @return 环评和批复
     */
    @Override
    public List<EnvProReport> selectEnvProReportList(EnvProReport envProReport)
    {
        return envProReportMapper.selectEnvProReportList(envProReport);
    }

    /**
     * 新增环评和批复
     * 
     * @param envProReport 环评和批复
     * @return 结果
     */
    @Override
    public int insertEnvProReport(EnvProReport envProReport)
    {
        envProReport.setCreateTime(DateUtils.getNowDate());
        return envProReportMapper.insertEnvProReport(envProReport);
    }

    /**
     * 修改环评和批复
     * 
     * @param envProReport 环评和批复
     * @return 结果
     */
    @Override
    public int updateEnvProReport(EnvProReport envProReport)
    {
        envProReport.setUpdateTime(DateUtils.getNowDate());
        return envProReportMapper.updateEnvProReport(envProReport);
    }

    /**
     * 批量删除环评和批复
     * 
     * @param eprIds 需要删除的环评和批复ID
     * @return 结果
     */
    @Override
    public int deleteEnvProReportByIds(Long[] eprIds)
    {
        return envProReportMapper.deleteEnvProReportByIds(eprIds);
    }

    /**
     * 删除环评和批复信息
     * 
     * @param eprId 环评和批复ID
     * @return 结果
     */
    @Override
    public int deleteEnvProReportById(Long eprId)
    {
        return envProReportMapper.deleteEnvProReportById(eprId);
    }
}
